package com.example.project.service;

import com.example.project.entity.TcdmSecureHazardAssessment;
import com.example.project.entity.TcdmSecureHazardList;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;

import javax.xml.crypto.Data;
import java.util.Date;
import java.util.List;

/**
 * (TcdmSecureHazardAssessment)表服务接口
 *
 * @author makejava
 * @since 2024-02-23 15:18:23
 */
public interface TcdmSecureHazardAssessmentService {

    /**
     * 通过ID查询单条数据
     *
     * @param tshaId 主键
     * @return 实例对象
     */
    TcdmSecureHazardAssessment queryById(Integer tshaId);

    /**
     * 查询所有数据
     *
     * @return 所有数据
     */
    List<TcdmSecureHazardAssessment> findList();

    /**
     * 分页查询
     *
     * @param tcdmSecureHazardAssessment 筛选条件
     * @param pageRequest                分页对象
     * @return 查询结果
     */
    Page<TcdmSecureHazardAssessment> queryByPage(TcdmSecureHazardAssessment tcdmSecureHazardAssessment, PageRequest pageRequest, Date star, Date end);

    /**
     * 新增数据
     *
     * @param tcdmSecureHazardAssessment 实例对象
     * @return 实例对象
     */
    TcdmSecureHazardAssessment insert(TcdmSecureHazardAssessment tcdmSecureHazardAssessment);

    /**
     * 修改数据
     *
     * @param tcdmSecureHazardAssessment 实例对象
     * @return 实例对象
     */
    TcdmSecureHazardAssessment update(TcdmSecureHazardAssessment tcdmSecureHazardAssessment);

    /**
     * 通过主键删除数据
     *
     * @param tshaId 主键
     * @return 是否成功
     */
    boolean deleteById(Integer tshaId);


    boolean deleteById1(Integer tshaId);

    boolean deleteByValid();

//    Page<TcdmSecureHazardList> findlist(TcdmSecureHazardAssessment tcdmSecureHazardAssessment, PageRequest pageRequest);
}
